package chap2_task;

import java.util.Scanner;

public class Task7 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("考生姓名:");
        String name = input.next();
        System.out.print("语文成绩:");
        double chinese = input.nextDouble();
        System.out.print("数学成绩:");
        double math = input.nextDouble();
        System.out.print("英语成绩:");
        double english = input.nextDouble();
        double sum = chinese + math + english;
        double average = sum / 3;
        System.out.println(name + "的成绩总分为:" + sum + "分,平均分为:" + average+"分");

    }
}
